﻿/***********************************************************************
 * <copyright file="IPermissionRepository.cs" company="B/S JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@newman.vn
 * Website:
 * Create Date: Saturday, March 29, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using DxMvcApplication.SecurityServiceReference;

namespace DxMvcApplication.Repositories.Core.Security
{
    /// <summary>
    /// IPermissionRepository
    /// </summary>
    public interface IPermissionRepository: IRepository<PermissionDto>
    {
        /// <summary>
        /// Checks the exists in role in site.
        /// </summary>
        /// <param name="siteId">The site identifier.</param>
        /// <param name="perCode">The per code.</param>
        /// <param name="userId">The user identifier.</param>
        /// <returns></returns>
        PermissionDto CheckExistsInRoleInSite(int siteId, string perCode, int userId);

        /// <summary>
        /// Gets the list by user and site.
        /// </summary>
        /// <param name="userId">The user identifier.</param>
        /// <param name="siteId">The site identifier.</param>
        /// <returns></returns>
        IList<PermissionDto> GetListByUserAndSite(int userId,int siteId);
    }
}